@echo off 
dir "D:\" > list.txt
echo "The program has completed"